package cn.t16.ms.feign.user;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import cn.t16.common.Result;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@FeignClient(value = "user-service",fallback = UserClientFallback.class)
public interface UserClient {
    @GetMapping("/myorders/{userId}")
    public Result myorders(@PathVariable Integer userId);
    @PostMapping("/users2")
    public Result save2(UserVO user, MultipartFile idPicPath);

    @GetMapping("/orders/{orderId}")
    public Result orders(@PathVariable Integer orderId);

    @GetMapping("/users/{id}")
    public Result get(@PathVariable Integer id);

    @PostMapping("/users")
    public Result save(@RequestBody UserVO user);

    @GetMapping("/users")
    public Result getAll();
}
